package com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestcargocntr;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 舱单货物箱关联 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author chenzheng
 */
@Data
public class ManifestCargoCntrBaseVO {

    @Schema(description = "外键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25352")
    private Long cargoId;

    @Schema(description = "箱号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifestcargocntr.cntrno.notblank}")
    @Length(max = 12, message = "{manifestcargocntr.cntrno.length}")
    private String cntrNo;

}
